The most one frame has spent on this phase since the game started or profile_reset() was last called, as a percentage of one frame.
Works differently on Game Boy - The Game Boy has no frame profiler: profile_enabled says false and every profile number reads 0.
Works differently on Game Boy Color - The Game Boy Color has no frame profiler: profile_enabled says false and every profile number reads 0.
On other consoles this differs: see Side by side and How the consoles differ.
profile_worst(phase) -> real| Name | Type |
|---|---|
phase | int |
real
The most one frame has spent on a phase since the game started, or since profile_reset was last called, as a percentage of one frame.
An average hides a short spike. A room loading, a big explosion, or fifty enemies waking at once can make a single frame very slow while all the frames around it are fine. The player feels that as a stutter. This is where you see it.
Every phase remembers its own worst frame, and they are usually different frames. So the worst numbers do not add up to the worst total.
var worst = profile_worst(PROFILE_TOTAL);
draw_text(4, 4, $"WORST {int_round(worst)}");Draws the most any single frame has cost so far. If it ever says more than 100, a frame has been late at least once.
This is where a short spike shows up, like a room loading, that an average hides. Each phase keeps its own worst frame, so the worst numbers do not add up to the worst total.